<?php include("includes/session.php"); ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>RBE-POD - Join SCFR</title>
<?php include("header.php"); ?>
	<center>
	<table cellpadding="0" cellspacing="0" width="80%">
	<tr>
		<td align="left">
			<br /><br />
			<center>
			<table cellpadding="10" cellspacing="0" class="border" bgcolor="#aeaeae">
			<tr>
				<td>
			<?php
				if(isset($_SESSION['regsuccess']))
				{
					if($_SESSION['regsuccess'])
					{
						echo "<center><b>Registration Successful</b></center><br />";
						echo "<center>Please check your e-mail or spam mail to verify your account.</center>";
					}
					else
					{
						echo "<center><b>Sorry Registration Failed</b></center><br />";
						echo "<center>Please try again later.</center>";
					}
					unset($_SESSION['regsuccess']);
				}
				else
				{
			?>
			<center><h2><?php echo $lang['REGISTER_TITLE']; ?></h2></center>
			<?php echo $lang['REGISTER_TEXT']; ?>
			
			<center>
			<form action="includes/process.php" method="POST">
			<table border="0" cellspacing="0" cellpadding="3">
			<tr>
				<td>Username:</td>
				<td><input type="text" name="user" maxlength="30" size="31" value="<? echo $form->value("user"); ?>" style="background-color: #bcc6e1;"></td><td><? echo $form->error("user"); ?></td>
			</tr>
			<tr>
				<td>Password:</td><td><input type="password" name="pass" maxlength="30" size="31" value="<? echo $form->value("pass"); ?>" style="background-color: #bcc6e1;"></td><td><? echo $form->error("pass"); ?></td>
			</tr>
			<tr>
				<td>Email:</td><td><input type="text" name="email" maxlength="50" size="31" value="<? echo $form->value("email"); ?>" style="background-color: #bcc6e1;"></td><td><? echo $form->error("email"); ?></td>
			</tr>
			<tr>
				<td>Country:</td>
				<td>
					<select name="country" style="background-color: #bcc6e1;">
						<?php $result = $database->query("SELECT * FROM ".TBL_COUNTRIES);
							$num_rows = mysql_num_rows($result);
							for($i=0;$i<$num_rows;$i++)
							{
								$country = mysql_result($result,$i,"country");
								$code = mysql_result($result,$i,"code");
								echo "<option value=\"$code\" ";
								if($form->value('country')=='' && $i==0 || $form->value('country')==$code)
								{
									echo "selected=\"selected\" ";
								}
								echo ">$country</option>";
							}
						 ?>
					</select>
				</td>
			</tr>
			<tr>
				<td>Gender:</td>
				<td>
					<input type="radio" <?php if($form->value('gender')=='' || $form->value('gender')=='Male'){ echo "checked=\"checked\""; } ?> name="gender" value="Male">Male&nbsp;&nbsp;&nbsp;
					<input type="radio" <?php if($form->value('gender')=='Female'){ echo "checked=\"checked\""; } ?> name="gender" value="Female">Female
				</td>
			</tr>
			<tr>
				<td></td>
				<td><img src="includes/Captcha/CaptchaSecurityImages.php?width=100&height=40&characters=5" /></td>
			</tr>
			<tr>
				<td>Captcha:</td>
				<td><input name="security_code" type="text" style="background-color: #bcc6e1;" /></td>
				<td><? echo $form->error("security_code"); ?></td>
			</tr>
			<tr>
				<td colspan="2" align="right">
					<input type="hidden" name="subjoin" value="1">
					<input type="submit" value="Join The Movement">
				</td>
			</tr>
			</table>
			</form>
			</center>
			<?php
				}
			?>
				</td>
			</tr>
			</table>
			</center>
		</td>
	</tr>
	</table>
	</center>
<?php include("footer.php"); ?>